/**
 * 2017年7月5日
 */
package jdk;

/**
 * @author Alex
 *
 */
public class ThreadLocalTest {
	public static void main(String[] args) {
		ThreadLocal<String> tl = new ThreadLocal<String>(){
			@Override
			protected String initialValue() {
				System.out.println(Thread.currentThread()+"init");
				return "hello";
			}
		};
		
		System.out.println(tl.get());
		tl.remove();
		System.out.println(tl.get());
		tl.set(null);
		System.out.println(tl.get());
	}
}
